import { useCommon } from "@/stores/Common"
import { reactive, toRefs } from "vue"
const CommonStore = useCommon()

const { SecondLeafArr, FirstValueData } = toRefs(CommonStore)

export const searchConfig = reactive({
    departmentWard: {
        component: "ACascader",
        label: "科室",
        attrs: {
            allowClear: true,
            placeholder: '科室',
            changeOnSelect: true,
            options: SecondLeafArr,
            style: {
                width: '100%'
            }
        },
    }
})

export const addConfig = {
    department: {
        component: "AInput",
        label: "科室",
        attrs: {
            allowClear: true,
            placeholder: '科室',
            style: {
                width: '100%'
            }
        },
        rules: [{ required: true, message: '请输入科室！', trigger: 'blur' }]
    },
    illArea: {
        component: 'AInput',
        label: '病区',
        attrs: {
            allowClear: true,
            placeholder: '病区',
            style: {
                width: '100%'
            }
        },
    }
}


export const columns = [
    {
        title: '序号',
        dataIndex: 'index',
        align: 'center',
        width: 80,
        fixed: 'left'
    }, {
        title: '科室',
        dataIndex: 'departmentWard',
        width: 300,
        align: 'center',
    }, {
        title: '创建时间',
        dataIndex: 'createTime',
        width: 200,
        align: 'center',
    }, {
        title: '操作',
        dataIndex: 'action',
        width: 150,
        align: 'center',
        fixed: 'right'
    }
]